@echo off 
if "%1"=="h" goto begin 
start mshta vbscript:createobject("wscript.shell").run("""%~nx0"" h",0)(window.close)&&exit 
:begin

taskkill /f /im hass.exe
rem taskkill /f /im LogViewPro.exe
 
echo %~dp0   @@%time%>C:\Users\log\hass.log
%1(start /min cmd.exe /c %0 :&exit)
rem start C:\Users\log\LogViewPro.exe
hass -c %~dp0.. --debug --log-file C:\Users\log\hass.log